JSON Formatter
Paste JSON and it is indented instantly; syntax errors are reported with their position. Nothing leaves your browser.
// Waiting for input...
Paste JSON and it is indented instantly; syntax errors are reported with their position. Nothing leaves your browser.
// Waiting for input...
Paste minified or single-line JSON and it is expanded with four-space indentation as you type, and checked for valid syntax. A success or failure badge and the line count of the result appear above it, and the tidy result copies with one button. Use it to inspect API responses, logs and config files.
Every time the input changes, the browser's built-in JSON reader parses the text and, on success, the same built-in feature writes it back with four-space indentation. The result turns green, the status badge switches to valid and the lines are counted. On failure the panel turns red and shows the error message exactly as the browser returned it. For example, {"a":1,"b":[2,3]} becomes a seven-line result: the braces, "a": 1, "b": [, 2, 3 and the closing bracket each on their own line. Leading and trailing whitespace is ignored, and clearing the input returns to the waiting state. The tool's code contains nothing that sends data out; everything happens in the browser.
A character appears where it is not allowed. The usual causes are a trailing comma after the last item, single quotes instead of double quotes, or an unquoted key.
The tool's code parses it only in your browser and sends it nowhere. If it contained auth tokens, still clear the input when finished on a shared computer.
No. It only expands with four-space indentation and checks syntax; there is no minify or key-sorting feature.
Your source was escaped that way. Parsing restores the real characters, so the result shows readable text.